package ws.very.web.tpl

object LoadStatic extends BaseScalaTemplate[Html, Format[Html]](HtmlFormat) with ws.very.web.tpl.Template2[String, String, Html] {

  /**/
  def apply /*1.2*/ (path: String, typ: String = "js"): Html = {
    _display_ {
      def /*2.2*/ url /*2.5*/ (path: String) = {
        {
          import scala.util._
          Http.webRoot + path + "?r=" + Random.nextInt //调试用
        }
      };
      Seq[Any](format.raw /*1.31*/ ("""
"""), format.raw /*5.2*/ ("""
"""), _display_(Seq[Any]( /*6.2*/ typ /*6.5*/ match /*6.11*/ { /*7.2*/ case "css" => /*7.14*/ { _display_(Seq[Any](format.raw /*7.15*/ ("""<link type="text/css" rel="stylesheet" href=""""), _display_(Seq[Any]( /*7.61*/ url(path))), format.raw /*7.70*/ ("""" />"""))) } /*8.2*/ case "js" => /*8.13*/ { _display_(Seq[Any](format.raw /*8.14*/ ("""<script type="text/javascript" src=""""), _display_(Seq[Any]( /*8.51*/ url(path))), format.raw /*8.60*/ (""""></script>"""))) } })))
    }
  }

  def render(path: String, typ: String): Html = apply(path, typ)

  def f: ((String, String) => Html) = (path, typ) => apply(path, typ)

  def ref: this.type = this

}